package ccmouse.guice.v13.helloworlddemo;

import ccmouse.guice.v13.MyAppletV7;
import com.google.inject.AbstractModule;

import java.io.PrintStream;

public class HelloWorldModule extends AbstractModule {
    @Override
    protected void configure() {
        bind(MyAppletV7.class).to(StringWritingAppletV3.class);
        bind(MyDestinationV4.class).to(PrintStreamWriterV4.class);
        bind(PrintStream.class).toInstance(System.out);

        // bind(String.class).toInstance("Hello World!!");


//        bind(String.class).toProvider(new Provider<String>() {
//            @Override
//            public String get() {
//                return "Hello World!";
//            }
//        });

        bind(String.class).annotatedWith(Output.class).toInstance("Hello World!!");

    }

//    @Provides
//    private String getString() {
//        return "Hello World!";
//    }
}
